import java.util.Arrays;
import java.util.LinkedList;

public class Test {
    public static void main(String[] args) {
        MyQueue myQueue =new MyQueue();
        myQueue.push(1);
        myQueue.push(2);
        myQueue.push(3);
        myQueue.push(4);
        myQueue.pop();
        myQueue.push(5);
        System.out.println(myQueue.pop());
        System.out.println(myQueue.peek());
    }
    public static void main9(String[] args) {
       MyCircularQueue myCircularQueue=new MyCircularQueue(4);
       myCircularQueue.enQueue(1);
        myCircularQueue.enQueue(2);
        myCircularQueue.enQueue(3);
        myCircularQueue.enQueue(4);
        myCircularQueue.enQueue(2);
        myCircularQueue.deQueue();
        myCircularQueue.enQueue(4);

    }
    public static void main8(String[] args) {
        MyStack myStack=new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        System.out.println(myStack.top());
        myStack.pop();
        System.out.println(myStack.top());
    }
    public static void main7(String[] args) {
        MinStack1 minStack1=new MinStack1();
        minStack1.push(-2);
        minStack1.push(0);
        minStack1.push(-3);
        System.out.println(minStack1.getMin());
        minStack1.pop();
        System.out.println(minStack1.top());
        System.out.println(minStack1.getMin());
    }
    public static void main6(String[] args) {
        int arr1[]={1,2,3,4,5};
        int arr2[]={5,4,3,2,1};
        System.out.println(Solution.IsPopOrder1(arr1, arr2));
    }
    public static void main5(String[] args) {
        int[] arr1= new int[]{4, 1, 2};
        int[] arr2=new int[]{1,3,4,2};

        int[]ret=Solution.nextGreaterElement(arr1,arr2);
        System.out.println(Arrays.toString(ret));


    }
    public static void main4(String[] args) {
        MyStack1 myStack=new MyStack1();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        System.out.println(myStack.top());
        System.out.println(myStack.pop());
        System.out.println(myStack.top());
    }
    public static void main3(String[] args) {
        MyCircularQueue myCircularQueue=new MyCircularQueue(3);
        myCircularQueue.enQueue(1);
        myCircularQueue.enQueue(2);
        myCircularQueue.enQueue(3);
        myCircularQueue.enQueue(4);
        System.out.println(myCircularQueue.Rear());
        System.out.println(myCircularQueue.isFull());
    }
    public static void main2(String[] args) {
        MyQueue1 myQueue=new MyQueue1();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println("");
    }
    public static void main1(String[] args) {
        MinStack minStack=new MinStack();
        minStack.push(3);
        minStack.push(-1);
        minStack.push(2);
        minStack.push(-5);
        minStack.pop();
        System.out.println(minStack.getMin());
        LinkedList<Integer> stack=new LinkedList<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack.peek());
    }
}
